/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: SecondMultyDiscount
 * Author:   zhouheng
 * Date:     2019/5/1 23:21
 * Description: 两件打折
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zhouh.patterns.com.zhouh.action.chain;

/**
 * 〈一句话功能简述〉<br> 
 * 〈两件打折〉
 *
 * @author zhouheng
 * @create 2019/5/1
 * @since 1.0.0
 */
public class SecondMultyDiscount extends MultyDiscount {

    public SecondMultyDiscount(MultyDiscount next) {
        super(next);
    }

    @Override
    public int calculate(int money) {
        Double balance = money * 0.9;
        System.out.println("第二单九折"+ (money - balance));

        return super.calculate(balance.intValue());
    }
}